package tables;

/**
 * 创建User对象时不需要给id赋值，在成功创建User对象并存进数据表时会自动给id赋值，这时再给User对象id赋值，该值唯一且不可修改
 */
public class User {
    private int user_id;
    private int user_age;
    private String user_account;
    private String user_password;
    private String user_name;
    private String user_sex;
    private String user_address;
    private String user_contact;

    public User(){ }

    public User(  String user_account, String user_password, String user_name, int user_age, String user_sex, String user_address, String user_contact) {
        this.user_age = user_age;
        this.user_account = user_account;
        this.user_password = user_password;
        this.user_name = user_name;
        this.user_sex = user_sex;
        this.user_address = user_address;
        this.user_contact = user_contact;
    }

    public void setUser_id(int user_id){
        this.user_id = user_id;
    }

    public int getUser_id() {
        return user_id;
    }

    public int getUser_age() {
        return user_age;
    }

    public void setUser_age(int user_age) {
        this.user_age = user_age;
    }

    public String getUser_account() {
        return user_account;
    }

    public void setUser_account(String user_account) {
        this.user_account = user_account;
    }

    public String getUser_password() {
        return user_password;
    }

    public void setUser_password(String user_password) {
        this.user_password = user_password;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getUser_sex() {
        return user_sex;
    }

    public void setUser_sex(String user_sex) {
        this.user_sex = user_sex;
    }

    public String getUser_address() {
        return user_address;
    }

    public void setUser_address(String user_address) {
        this.user_address = user_address;
    }

    public String getUser_contact() {
        return user_contact;
    }

    public void setUser_contact(String user_contact) {
        this.user_contact = user_contact;
    }

    public String toString() {
        return "User{" +
                "user_id=" + user_id +
                ", user_account='" + user_account + '\'' +
                ", user_password='" + user_password + '\'' +
                ", user_name='" + user_name + '\'' +
                ", user_age='" + user_age + '\'' +
                ", user_sex='" + user_sex + '\'' +
                ", user_address='" + user_address + '\'' +
                ",user_contact='" + user_contact +
                "'}";
    }


}
